import json

def count_databases_and_tables(filename):
    with open(filename, 'r') as file:
        data = json.load(file)

    database_count = 0
    table_count = 0

    for item in data:
        if 'database' in item:
            database_count += 1
            if 'tables' in item:
                table_count += len(item['tables'])

    return database_count, table_count

filename = 'table_structure.json'

database_count, table_count = count_databases_and_tables(filename)
print(f"The JSON file contains {database_count} databases and {table_count} tables.")